enum Method {
  GET = "GET",
  POST = "POST",
  PUT = "PUT",
  DELETE = "DELETE",
}

interface IApi {
  url: string;
  method: Method;
  params?: object;
  data?: object;
}

//获取导航栏
export function getNav() {
  return useServerRequest("nav1", { method: Method.GET });
}

//获取首页轮播图
export function getBanner(params: object) {
  return useServerRequest("banner", { method: Method.GET, params });
}

//获取管理后台列表
export function getAdminList(params: object) {
  return useServerRequest("admin", { method: Method.GET, params });
}

//获取活动列表
export function getActivityList(params: object) {
  return useServerRequest("activity", { method: Method.GET, params });
}

//活动报名
export function postActivity(params: object) {
  return useServerRequest("activityRegister", { method: Method.POST, params });
}

//获取赛事大屏
export function getMatchScreen(params: object) {
  return useServerRequest("bigScreen", { method: Method.GET, params });
}

/*
 * 服务介绍
 */
//获取服务介绍列表
export function getServiceList(params: object) {
  return useServerRequest("serveList", { method: Method.GET, params });
}

/*
实时赛事
*/
//获取实时赛事介绍
export function getMatchList(params: object) {
  return useServerRequest("realtimeRace", { method: Method.GET, params });
}

/*
 * 联系我们
 */
//获取联系我们列表
export function getContactList(params: object) {
  return useServerRequest("contact", { method: Method.GET, params });
}

//在线留言
export function postMessage(params: object) {
  return useServerRequest("contactUs", { method: Method.POST, params });
}
